import axios from "@/request";

interface IAdsItem {
    name: string,
    items: Array<any>
}

// 获取广告位列表
const getAdsList = () => {
    return axios.get("/rest/ads")
}

// 广告位列表新增
const addAdsItem = (params: IAdsItem) => {
    return axios.post("/rest/ads", params)
}

// 删除广告位
const delAdsItem = (id: string) => {
    return axios.delete("/rest/ads/" + id)
}

// 获取广告位详情
const getAdsDetail = (id: string) => {
    return axios.get("/rest/ads/" + id)
}


export {
    getAdsList,
    addAdsItem,
    delAdsItem,
    getAdsDetail
}